﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@include file="/WEB-INF/jsp/common/head.jsp" %>

<div class="right">
    <div class="location">
        <strong>当前位置:</strong>
        <span>用户管理页面 >> 用户修改页面</span>
    </div>
    <div class="supplierAdd">
        <form id="userForm" name="userForm" method="post" action="${pageContext.request.contextPath }/user/update">
            <div>
                <label for="userCode">用户编码：</label>
                <input type="hidden" value="${user.id }" name="id"/>
                <input type="text" name="userCode" id="userCode" validateStatus="false" value="${user.userCode}"
                       readonly>
                <!-- 放置提示信息 -->
                <font color="red"></font>
            </div>
            <div>
                <label for="userName">用户名称：</label>
                <input type="text" name="userName" id="userName" value="${user.userName}">
                <font color="red"></font>
            </div>
            <div>
                <label for="userPassword">用户密码：</label>
                <input type="password" name="userPassword" id="userPassword" value="${user.userPassword}">
                <font color="red"></font>
            </div>
            <div>
                <label>用户性别：</label>
                <select name="gender" id="gender">
                    <option value="1" <c:if test="${user.gender==1}">selected="selected"</c:if>>女</option>
                    <option value="2" <c:if test="${user.gender==2}">selected="selected"</c:if>>男</option>
                </select>
            </div>
            <div>
                <label for="birthday">出生日期：</label>
                <input type="text" Class="Wdate" id="birthday" name="birthday"
                       readonly="readonly" value="<fmt:formatDate value="${user.birthday}" pattern="yyyy-MM-dd"/>"
                       onclick="WdatePicker();">
                <font color="red"></font>
            </div>
            <div>
                <label for="phone">用户电话：</label>
                <input type="text" name="phone" id="phone" value="${user.phone}">
                <font color="red"></font>
            </div>
            <div>
                <label for="address">用户地址：</label>
                <input name="address" id="address" value="${user.address}">
            </div>
            <div>
                <label>用户角色：</label>
                <!-- 列出所有的角色分类 -->
                <input type="hidden" value="${user.userRole }" id="rid"/>
                <select name="userRole" id="roleList"></select>
                <%--<select name="userRole" id="roleId">
                    <option value="1">系统管理员</option>
                    <option value="2">经理</option>
                    <option value="3" selected="selected">普通用户</option>
                </select>--%>
                <font color="red"></font>
            </div>
            <%--   <div>
                   <input type="hidden" id="errorinfo" value="${uploadFileError}"/>
                   <label for="a_idPicPath">证件照：</label>
                   <input type="file" name="attach" id="a_idPicPath"/>
                   <font color="red"></font>
               </div>--%>
            <%--  <div>
                 <input type="hidden" id="errorinfo_wp" value="${uploadWpError}"/>
                 <label for="a_workPicPath">工作证照片：</label>
                    <input type="file" name="attachs" id="a_workPicPath"/>
                 <font color="red"></font>
             </div>--%>
            <div class="supplierAddBtn">
                <input type="submit" id="add" value="保存">
                <input type="button" id="back" name="back" value="返回">
            </div>
        </form>
    </div>
</div>
</section>
<%@include file="/WEB-INF/jsp/common/foot.jsp" %>
<%--add.js最好放到底下，因为需要先去加载add.jsp文件才会有文本框的元素--%>
<script type="text/javascript" src="${pageContext.request.contextPath }/statics/js/sysUser/update.js"></script>
